<html>
<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
    <title>
        js调用java
    </title>
</head>

<body>
<p>
    <xmp id="show">
    </xmp>
</p>
<div align="center">
    <p>
        <input type="button" id="enter" value="获取用户信息" onclick="getUserInfo();"
        />
    </p>
</div>
</body>
<script>

    function getUserInfo(){
        window.WebViewJavascriptBridge.callHandler(
            'getUserInfo',
            {'info': 'I am JS, want to get UserInfo from Java'},
            function(responseData) {
                document.getElementById("show").innerHTML = "repsonseData from java,\ndata = " + responseData;
            }
        )
    }


</script>

</html>